import request from '@/utils/request'

// 查询配置列表
export function configList(type) {
  return request({
    url: `/sys/share/config/list/${type}`,
    method: 'get',
  })
}
// 更新配置
export function updateConfig(data) {
  return request({
    url: '/sys/share/config/edit',
    method: 'put',
    data:data
  })
}
// 新增层级
export function addShareConfig(data) {
  return request({
    url: '/sys/share/config/add',
    method: 'post',
    data:data
  })
}
export function delConfig(id) {
    return request({
        url: `/sys/share/config/del/${id}`,
        method: 'delete'
      })
  }
// 查询店铺等级列表
export function storeLevelList(query) {
  return request({
    url: `/web/shop-level/all`,
    method: 'get',
    params: query
  })
}
// 更新店铺等级
export function updateStoreLevel(data) {
  return request({
    url: '/web/shop-level/put',
    method: 'put',
    data:data
  })
}
// 新增店铺等级
export function addStoreLevel(data) {
  return request({
    url: '/web/shop-level/add',
    method: 'put',
    data:data
  })
}
// 删除店铺等级详情
export function storeLevelDetails(id) {
  return request({
    url: `/web/shop-level/${id}`,
    method: 'delete'
  })
}
// 查询用户等级列表
export function userLevelList(query) {
    return request({
      url: "/sys/app/user/level/all",
      method: 'get',
      params: query
    })
  }
// 修改用户等级
export function userLevelUpdate(data) {
    return request({
      url: "/sys/app/user/level/edit",
      method: 'put',
      data: data
    })
  }
// 新增用户等级
export function userLevelAdd(data) {
    return request({
      url: "/sys/app/user/level/save",
      method: 'post',
      data: data
    })
  }
// 删除用户等级详情
export function deleteUserLevel(id) {
    return request({
      url: `/sys/app/user/level/${id}`,
      method: 'delete'
    })
  }